import time
from selenium import webdriver
from selenium.webdriver.common.by import By

dr = webdriver.Chrome()
dr.get("https://demo.fastadmin.net/admin.php/index/login")
dr.maximize_window()
time.sleep(2)
# 输入用户名和密码
dr.find_element(By.ID,"pd-form-username").send_keys("admin")
dr.find_element(By.ID,"pd-form-password").send_keys("123456")
time.sleep(2)
# 点击登录
dr.find_element(By.CSS_SELECTOR,"#login-form > div:nth-child(7) > button").click()
time.sleep(5)
dr.quit()